package com.leon.picture.service;

import java.util.List;

import com.leon.classify.domain.AdvertPic;
import com.leon.classify.domain.HeadAdvert;
import com.leon.classify.domain.HeadAdvertList;
import com.leon.classify.domain.User;
import com.leon.picture.dao.PictureDao;

public class PictureService {
	
	private PictureDao pictureDao;

	public PictureDao getPictureDao() {
		return pictureDao;
	}

	public void setPictureDao(PictureDao pictureDao) {
		this.pictureDao = pictureDao;
	}
	
	public AdvertPic getAdvertPicById(String id){
		return pictureDao.getAdvertPicById(id);
	}
	public void createAdvertPic(AdvertPic ap){
		pictureDao.createObject(ap);
	}
	public List<HeadAdvert> getAllHeadAdvert(){
		return pictureDao.getAllHeadAdvert();
	}
	
	public void createHeadAd(HeadAdvert ad){
		pictureDao.createObject(ad);
	}
	
	public HeadAdvert getHeadAdvertById(String id){
		return pictureDao.getHeadAdvertById(id);
	}
	
	public void createHeadAdList(HeadAdvertList hdl){
		pictureDao.createObject(hdl);
	}
	
	public HeadAdvertList getHeadAdvertListById(String id){
		return pictureDao.getHeadAdvertListById(id);
	}
	
	public void delHeadAdList(HeadAdvertList hal){
		pictureDao.deleteObject(hal);
	}
	public void delHeadAdvert(HeadAdvert ha){
		pictureDao.delObject(ha);
	}
	public List<AdvertPic> getHeadAdvertPic(){
		return pictureDao.getHeadAdvertPic();
	}

	
	public List<AdvertPic> getSecondPicList(){
		return pictureDao.getSecondPicList();
	}
	
	public List<User> getAllUser(){
		return pictureDao.getAllUser();
	}
	
	public User getUser(String id){
		return pictureDao.getUser(id);
	}
	
	public void createUser(User user){
		pictureDao.createObject(user);
	}
	public void deleteUser(User user){
		pictureDao.deleteObject(user);
	}
	
	public User getUserByName(String userName,String password){
		return pictureDao.getUserByName(userName, password);
	}
}
